This is the CBird class as it is in original game.
Of course rewritten but it does exactly the same as the game does.